﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//
using System.Windows.Forms;

namespace AUI
{
    internal static class modSystem
    {
        public static void Menu_Init(ToolStripMenuItem menuItem)
        {

        }

        public static void Menu_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            String menuName = e.ClickedItem.Name;
            menuName = menuName.Substring(menuName.IndexOf("mnu") + 3);
            Form f;
            switch (menuName)
            {
                case "Login":
                    Program.m_frmMain.SignIn();
                    break;
                case "Logout":
                    Program.m_frmMain.SignOut();
                    break;
                case "ChangePass":
                    f = new frmChangePassword();
                    (f as frmChangePassword).ShowDialog();
                    break;
                //case "ToolBarOption":
                //    f = new frmToolbar_Config();
                //    (f as frmToolbar_Config).ShowDialog();
                //    break;
                //case "Users_Manage":
                //    f = new frmUsers_Manage();
                //    (f as frmUsers_Manage).Show_Form();
                //    break;
                //case "Roles_Manage":
                //    f = new frmRoles_Manage();
                //    (f as frmRoles_Manage).Show_Form();
                //    break;
                //case "Units_Manage":
                //    f = new frmUnits_Manage();
                //    (f as frmUnits_Manage).Show_Form();
                //    break;
                //case "SysParam":
                //    f = new frmSysParameter();
                //    (f as frmSysParameter).Show_Form();
                //    break;
                case "Exit":
                    Program.m_frmMain.Close();
                    break;
            }
        }
    }
}